
GCC = gcc

CFLAGS += -fsanitize=address
CFLAGS += -lfethird
# CFLAGS += -lfreetype -ljpeg -lpng -lz -static
CFLAGS += -Wall -lm -lstdc++

LIBS += -L../../third/libs/lib

INCS += -I../
INCS += -I../../3d/
INCS += -I../../common/
INCS += -I../../util/
INCS += -I../../third
INCS += -I../../third/libs/include
INCS += -I../../third/libs/include/freetype2

SRCS += ../../util/util_bmp.cpp
SRCS += ../../util/util_picture.cpp
SRCS += ../../util/util_crc32.cpp
# 包含文件夹的所有.cpp文件
SRCS += ${wildcard ../*.cpp}
SRCS += ${wildcard ../../3d/*.cpp}
SRCS += ${wildcard ../../common/*.cpp}
SRCS += ${wildcard ../../third/*.c}

all: test font

test:
	@$(GCC) -o out.$@ $@.cpp $(INCS) $(SRCS) $(CFLAGS) $(LIBS)

font:
	@$(GCC) -o out.$@ $@.cpp $(INCS) $(SRCS) $(CFLAGS) $(LIBS)

clean:
	@rm -rf out*
